// Code Behind for createdirdialog.mxml
       import jcrweb.as3.FlexUtil;
       import jcrweb.as3.RequestUtil;
       import mx.controls.Alert;
       import mx.managers.PopUpManager;
	   import jcrweb.as3.LanguageUtil;
	   [Bindable]
	    private var languageUtil:LanguageUtil;
		[Bindable]
		private var strPath:String = "";
		[Bindable]
		private var strPathName:String = "";
		[Bindable]
		private var createrCode:String = "";
		[Bindable]
		private var createrName:String = "";
		[Bindable]
		[Embed(source='../WebContent/images/error.gif')]
		private var iconError:Class;
		
	   private function init():void {
		languageUtil = LanguageUtil.getInstance();
	}
		public function setCreaterCode(createrCode:String):void{
			this.createrCode = createrCode
		}
		
		public function setCreaterName(createrName:String):void{
			this.createrName = createrName
		}
		
		public function setPath(path:String):void{
			this.strPath = path;
		}
		public function setPathName(pathName:String):void{
			this.strPathName = pathName;
		}
		private function reset():void{
			input_name.text = "";
			input_note.text = "";
		}
		private function submit():void{
			if(input_name.text == ""){
				Alert.show("please input name.","Error",0,null,null,iconError);
				return;
			}
			var para:String = new String();
			para +="&path="+input_path.text;
			para +="&name="+input_name.text;
			para +="&createrCode="+input_createrCode.text;
			para +="&createrName="+input_createrName.text;
			para +="&note="+input_note.text;
			para =  encodeURI(para);
			para =  encodeURI(para);
			var url:String = RequestUtil.CREATEDIR_URL+para;
			RequestUtil.sendRequest(url,Event.COMPLETE,complete);
		}
		public function complete(event:Event):void {
			var loader:URLLoader = URLLoader(event.target); 
			var isError:String = FlexUtil.getTag(loader.data,FlexUtil.IS_ERROR);
			if(isError == "true" ){
				var errorMes:String = FlexUtil.getTag(loader.data,FlexUtil.ERROR_MES_TAG);
				Alert.show("Create directory faild! "+errorMes,"Error",0,null,null,iconError);
			}
			closeDialog();
		}
		private function closeDialog():void{
			PopUpManager.removePopUp(this);
		}
		private function keyDownEvent(keyCode:uint):void{
				if(keyCode == 27){
					this.closeDialog();
				}
		}		